package com.dao;

import com.mypg.News;
import com.mypg.Question;
import com.mypg.TQuestion;
import org.apache.ibatis.annotations.Param;

import java.sql.Timestamp;
import java.util.List;

public interface QuestionDao {
    List<Question> selectAllQuestion();
    Question selectQuestionByQuestion_id(int question_id);
    List<Question> selectQuestionFor_question_table_jsp(@Param("question_class")String question_class, @Param("question_chapter")String question_chapter,
                                                        @Param("question_ori")String question_ori,
                                                    @Param("start_row")int start_row, @Param("page_nums")int page_nums);
    int selectQuestion_count_For_question_table_jsp(@Param("question_class")String question_class,
                                                    @Param("question_chapter")String question_chapter,
                                                    @Param("question_ori")String question_ori);
    int selectQuestion_count();
    List<Question> selectAllQuestionByChapter(@Param("question_class")String question_class,
                                              @Param("question_chapter")String question_chapter,
                                              @Param("rand_flag")String rand_flag,
                                              @Param("rand_num")int rand_num,
                                              @Param("other_class")String other_class);
    int selectCountByChapter(@Param("question_class")String question_class,
                             @Param("question_chapter")String question_chapter,
                             @Param("rand_flag")String rand_flag,
                             @Param("rand_num")int rand_num,
                             @Param("other_class")String other_class);


    List<Question> selectQuestionForReal_test(@Param("question_class")String question_class,
                                              @Param("question_chapter")String question_chapter,
                                              @Param("question_num")int question_num,
                                              @Param("rand_num")int rand_num);
    String[] selectQuestion_chapter(String question_class);

    List<TQuestion> selectAllTQuestion();

    void insertQuestion(Question question);

    void deleteQuestionByQuestion_id(int question_id);

    void updateQuestionByQuestion_id(Question question);
    void updateQuestion_imgByQuestion_id(@Param("question_img")String question_img,@Param("question_id")int question_id);
}
